Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GDScript] Add StringName support to @GDScript.len #86704

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

AThousandShips
Copy link
Member

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me. Would be good to have this approved by someone from the GDScript team too.

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Jan 2, 2024
Copy link
Member

@dalexeev dalexeev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great to add tests for utility functions, but it is not required for this PR. The docs could be updated:

<method name="len">
<return type="int" />
<param index="0" name="var" type="Variant" />
<description>
Returns the length of the given Variant [param var]. The length can be the character count of a [String], the element count of any array type or the size of a [Dictionary]. For every other Variant type, a run-time error is generated and execution is stopped.

@akien-mga akien-mga merged commit 06bb9f2 into godotengine:master Jan 2, 2024
15 checks passed
@AThousandShips AThousandShips deleted the len_fix branch January 2, 2024 14:18
@akien-mga
Copy link
Member

Thanks!

@AThousandShips
Copy link
Member Author

AThousandShips commented Jan 2, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for StringName in len function
3 participants